package com.example.lp.basemvp.presebter;

import android.util.Log;

import com.example.lp.basemvp.baseview.IBaseView;
import com.example.lp.basemvp.baseview.IStartView;
import com.example.lp.basemvp.bean.Start;
import com.example.lp.basemvp.model.IBaseModel;
import com.example.lp.basemvp.model.StartModel;

import java.lang.ref.WeakReference;
import java.util.List;

public class StartPresenter extends BasePrsenter<IStartView,StartModel>implements IBasePresenter  {
    public void refresh() {
        Log.e("StartPresenter", "refresh: ");
        mModel.getData(new IBaseModel.OnLoaderListener<Start>() {
            @Override
            public void OnComplete(List<Start> dataList) {
                mView.get().showData(dataList);
            }

            @Override
            public void OnError(String error) {
                mView.get().showError(error);

            }
        });
    }


}
